<?php
if($act=="edit")
{
    $sql_select = "SELECT * FROM tblcategory WHERE iId = ".$id;
    $rs=$dbsql->query($sql_select);
    if ($dbsql->num_rows($rs)==0)
    {
        page_transfer("Category not Exists!");
    }
    $category = $dbsql->fetch_array($rs);

    Select_Tag($id,'Category%');
}else
{
    $category   = array();
    $category['iParentId']  = $id;
    $category['iStatus']    = 1;
    $id                     = 0;
}
?>
